package com.sunny.ynhz.customphoto;

import android.content.Context;
import android.content.Intent;

import com.foamtrace.photopicker.ImageConfig;
import com.foamtrace.photopicker.SelectModel;

import java.util.ArrayList;

/**
 * Created by hhh on 2017/12/20.
 */

    public class  CustomPhotoPickerIntent extends Intent {

        public  CustomPhotoPickerIntent(Context packageContext) {
            super(packageContext, CustomPhotoPickerActivity.class);
        }

        public void setShowCarema(boolean bool){
            this.putExtra(CustomPhotoPickerActivity.EXTRA_SHOW_CAMERA, bool);
        }

        public void setMaxTotal(int total){
            this.putExtra(CustomPhotoPickerActivity.EXTRA_SELECT_COUNT, total);
        }

        /**
         * 选择
         * @param model
         */
        public void setSelectModel(SelectModel model){
            this.putExtra(CustomPhotoPickerActivity.EXTRA_SELECT_MODE, Integer.parseInt(model.toString()));
        }

        /**
         * 已选择的照片地址
         * @param imagePathis
         */
        public void setSelectedPaths(ArrayList<String> imagePathis){
            this.putStringArrayListExtra(CustomPhotoPickerActivity.EXTRA_DEFAULT_SELECTED_LIST, imagePathis);
        }

        /**
         * 显示相册图片的属性
         * @param config
         */
        public void setImageConfig(ImageConfig config){
            this.putExtra(CustomPhotoPickerActivity.EXTRA_IMAGE_CONFIG, config);
        }
    }


